package cn.hznc.repository;

import cn.hznc.domain.entity.ToolForkInfoEntity;
import cn.hznc.domain.entity.TypeItemEntity;
import cn.hznc.domain.request.toolfork.QueryIndexReq;
import cn.hznc.domain.request.toolfork.QueryToolInfoReq;
import cn.hznc.vo.LocationNameVo;
import cn.hznc.vo.ToolInventoryLocationQueryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 刀具数据层
 *
 * @author xiahuanyu
 * @date 2023/3/3
 */
public interface ToolForkRespository {

    List<ToolForkInfoEntity> queryByCondition(@Param("queryToolInfoReq") QueryToolInfoReq queryToolInfoReq , @Param("flag")Integer flag , @Param("match")String match);
    List<ToolForkInfoEntity> queryByConditionReload(@Param("queryToolInfoReq") QueryToolInfoReq queryToolInfoReq);

    int deleteToolFork(@Param("ids") List<Integer> ids);

    void editToolFork(@Param("entity") ToolForkInfoEntity entity);

    void addToolFork(@Param("entity") ToolForkInfoEntity entity);

    ToolForkInfoEntity queryById(@Param("id") Integer id);

    int queryCountByIdnr(@Param("idnr") String idnr);

    List<TypeItemEntity> queryTypeByIndex(@Param("queryIndexReq") QueryIndexReq queryIndexReq);

    ToolForkInfoEntity selectById(@Param("id")Integer id);

    String qryToolForkInfoById(Integer id);

    ToolInventoryLocationQueryVo getByToolNoAndPartno(String toolNo, String partno);

    String queryParamsById(Integer index);

    List<LocationNameVo> getListByToolType(@Param("type") String toolType);

    Integer countByType(String type);

    Integer getIdByPartNo(@Param("partno") String partno);

    List<Integer> selectIdByPartno(@Param("partno") String partno);

    List<ToolForkInfoEntity> queryCCWSReload1(@Param("queryToolInfoReq")QueryToolInfoReq queryToolInfoReq,@Param("flag")Integer flag , @Param("match1") String match1,@Param("match2") String match2,@Param("match3") String match3);

    void editPriceByPartno(@Param("partno") String partno,@Param("price") Double price);

    List<ToolForkInfoEntity> selectPartnoByIdnr(@Param("idnr") String idnr);
}
